<ion-view title="发货管理">
  <ion-nav-buttons side="left">
    <button class="button back-button buttons icon ion-ios-arrow-left button-clear header-item" nav-direction="back" ui-sref="menu">返回</button>
  </ion-nav-buttons>
  <ion-nav-buttons side="right">
    <button class="button button-icon icon ion-ios-search" ui-sref="hzcydsearch"></button>
  </ion-nav-buttons>
  <ion-tabs class="tabs-top tabs-stable tabs-color-positive">
    <ion-tab class="tabs-item" title="发货">
      <ion-view>
        <ion-content>
          <ion-refresher
                  pulling-text="下拉刷新..."
                  on-refresh="doRefreshF()">
          </ion-refresher>
          <ion-list ng-if="showloading == false">
            <h5 ng-if="fhdData==''" style="color: #69717d;text-align: center;margin-top: 50px;">未找到数据</h5>
            <ion-item  collection-repeat="fhd in fhdData" class="cydListItem" style="padding-top: 5px; padding-bottom: 5px;border-top-style: none;border-bottom-style: none;">
              <div class="ydList card list-inset" style="margin-bottom: 5px;">
                <div class="xuhao">
                  <i  style="margin-left: 5px;color: #fff;" ng-if="fhd.fhdlx==3">补录单</i>
                  <div class="light list-operation button-border" ng-if="fhd.fhdlx==3||fhd.fhdzt==1" ng-click="fhdChange(fhd.fhd_id,fhd.fhdlx)">
                    <i class="light list-operation">修改</i>
                  </div>
                  <i class="light" style="float: right;" ng-if="fhd.fhdzt==1">丨</i>
                  <div class="light list-operation button-border" ng-if="fhd.fhdzt==1&&fhd.fhdlx==1"  ng-click="submitFhd(fhd.fhd_id,fhd.fhrdh,fhd.fcity)" >
                    <i class="light list-operation">提交</i>
                  </div>
                  <div class="light list-operation button-border" ng-if="fhd.fhdzt==2&&fhd.fhdlx==1"  ng-click="recall(fhd.fhd_id,fhd.dd_id)" >
                    <i class="light list-operation">撤回</i>
                  </div>
                </div>
                <div ng-click="hzFhdDetail(fhd.fhd_id,fhd.fhdlx,fhd.cyd_id)" on-hold="deleteFhd(fhd)">
                  <label class="item item-input">
                    <i class="list-input">承运单号：</i>
                    <p>{{fhd.cydh}}</p>
                    <p  ng-if="fhd.fhdzt!=''" style="margin-left: auto;margin-right: 8px;" id="fhdZt{{fhd.fhd_id}}" ng-bind="getFhdZt(fhd.fhdzt)"></p>
                    <p  ng-if="fhd.fhdzt==''" style="margin-left: auto;margin-right: 8px;" ng-bind="getCydZt(fhd.cyzt)"></p>
                  </label>
                  <label class="item item-input">
                    <i class="list-input">发货单号：</i>
                    <p>{{fhd.fhdh}}</p>
                  </label>
                  <label class="item item-input" ng-if="fhd.fpro==''&&fhd.spro==''">
                    <p ng-if="fhd.mdd==''" style="font-size: 16px">{{fhd.fhzdmc}}<i class="ion-minus" style="font-size: 16px"></i><i class="ion-arrow-right-c" style="font-size: 16px"></i> {{fhd.shzdmc}}</p>
                    <p ng-if="fhd.mdd!=''" style="font-size: 16px">{{fhd.fhzdmc}}<i class="ion-minus" style="font-size: 16px"></i><i class="ion-arrow-right-c" style="font-size: 16px"></i> {{fhd.mdd}}</p>
                  </label>
                  <label class="item item-input" ng-if="fhd.fcity!=''&&fhd.scity!=''">
                    <p>{{fhd.fcity}}<i class="ion-minus" style="font-size: 16px"></i><i class="ion-arrow-right-c" style="font-size: 16px"></i> {{fhd.scity}}</p>
                  </label>
                  <label class="item item-input">
                    <i class="list-input">收货人：</i>
                    <p>{{fhd.shrmc}}</p>
                    <p>{{fhd.shrdh}}</p>
                  </label>
                  <label class="item item-input">
                    <div class="row">
                      <div  class="col-33"><p>货名:{{fhd.hwmc}}</p></div>
                      <div  class="col-33"><p>件数:{{fhd.sl}}</p></div>
                      <div  class="col-33"><p>运费:{{fhd.yf | number:2}}</p></div>
                    </div>
                  </label>
                </div>
              </div>
            </ion-item>
          </ion-list>
          <ion-infinite-scroll   on-infinite="loadMoreF()"  distance="1%" ng-if="hasNextPageF()"></ion-infinite-scroll>
        </ion-content>
      </ion-view>
    </ion-tab>
    <ion-tab class="tabs-item" title="收货" on-select="selectTab()">
      <ion-view>
        <ion-content>
          <ion-refresher
                  pulling-text="下拉刷新..."
                  on-refresh="doRefreshS()">
          </ion-refresher>
          <ion-list ng-if="showloading == false">
            <h5 ng-if="shdData==''" style="color: #69717d;text-align: center;margin-top: 50px;">未找到数据</h5>
            <ion-item  collection-repeat="shd in shdData" class="cydListItem" style="padding-top: 5px; padding-bottom: 5px;border-top-style: none;border-bottom-style: none;">
              <div class="ydList card list-inset" style="margin-bottom: 5px;">
                <div class="xuhao">
                  <div class="light list-operation button-border" ng-click="doReceipt(shd)" ng-if="shd.fhdzt==5||shd.cyzt==70">
                    <i class="light list-operation">签收</i>
                  </div>
                </div>
                <div ng-click="hzFhdDetail(shd.fhd_id,shd.fhdlx,shd.cyd_id)">
                  <label class="item item-input">
                    <i class="list-input">承运单号：</i>
                    <p>{{shd.cydh}}</p>
                    <p  ng-if="shd.fhdzt!=''" style="margin-left: auto;margin-right: 8px;" id="shdZt{{shd.fhd_id}}" ng-bind="getFhdZt(shd.fhdzt)"></p>
                    <p  ng-if="shd.fhdzt==''" style="margin-left: auto;margin-right: 8px;" ng-bind="getCydZt(shd.cyzt)"></p>
                  </label>
                  <label class="item item-input">
                    <i class="list-input">发货单号：</i>
                    <p>{{shd.fhdh}}</p>
                  </label>
                  <label class="item item-input" ng-if="shd.fpro==''&&shd.spro==''">
                    <p ng-if="shd.mdd==''" style="font-size: 16px">{{shd.fhzdmc}}<i class="ion-minus" style="font-size: 16px"></i><i class="ion-arrow-right-c" style="font-size: 16px"></i> {{shd.shzdmc}}</p>
                    <p ng-if="shd.mdd!=''" style="font-size: 16px">{{shd.fhzdmc}}<i class="ion-minus" style="font-size: 16px"></i><i class="ion-arrow-right-c" style="font-size: 16px"></i> {{shd.mdd}}</p>
                  </label>
                  <label class="item item-input" ng-if="shd.fcity!=''&&shd.scity!=''">
                    <p>{{shd.fcity}}<i class="ion-minus" style="font-size: 16px"></i><i class="ion-arrow-right-c" style="font-size: 16px"></i> {{shd.scity}}</p>
                  </label>
                  <label class="item item-input">
                    <i class="list-input">发货人：</i>
                    <p>{{shd.fhrmc}}</p>
                    <p>{{shd.fhrdh}}</p>
                  </label>
                  <label class="item item-input">
                    <div class="row">
                      <div  class="col-33"><p>货名:{{shd.hwmc}}</p></div>
                      <div  class="col-33"><p>件数:{{shd.sl}}</p></div>
                      <div  class="col-33"><p>运费:{{shd.yf | number:2}}</p></div>
                    </div>
                  </label>
                </div>
              </div>
            </ion-item>
          </ion-list>
          <ion-infinite-scroll   on-infinite="loadMoreS()"  distance="1%" ng-if="hasNextPageS()"></ion-infinite-scroll>
        </ion-content>
      </ion-view>
    </ion-tab>
  </ion-tabs>
</ion-view>
